package com.sky.mapper;

import com.sky.anotion.AutoFill;
import com.sky.anotion.AutoId;
import com.sky.entity.CompetitionApplication;
import com.sky.enumeration.OperationType;
import com.sky.dto.common.QueryParams;
import com.sky.vo.CompetionListQueryVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface CompetitionApplicationMapper {

    /**
     * 插入竞赛申请表记录
     */
    @AutoFill(OperationType.INSERT)
    @AutoId
    void insert(CompetitionApplication competitionApplication);

    /**
     * 根据竞赛ID查询申请表
     */
    CompetitionApplication getByCompetitionId(String competitionId);

    /**
     * 更新申请表信息
     */
    void update(CompetitionApplication competitionApplication);

    /**
     * 根据ID删除申请表
     */
    void deleteById(String id);

    /**
     * 分页查询竞赛申请表列表（联表查询）
     * @param queryParams 查询参数
     * @return 竞赛申请表列表
     */
    List<CompetionListQueryVO> pageQuery(QueryParams queryParams);
}
